<template>
	<view>
	        <home v-if="PageCur=='home'"></home>
	        <order v-if="PageCur=='order'"></order>
	        <cart v-if="PageCur=='cart'"></cart>
	        <user v-if="PageCur=='user'"></user>
		
		  <!-- 底部操作条：背景颜色、对应图标、字体颜色，可自定义 -->
		        <view class="cu-bar tabbar bg-white foot">
		            <!-- 首页 -->
		            <view class="action" :class="PageCur=='home'?'text-green':'text-gray'" 
		                data-cur="home" @click="NavChange">
		                <view class="cuIcon-homefill"></view> 操作条1
		            </view>
		            <!-- 分类 -->
		            <view class="action" :class="PageCur=='order'?'text-green':'text-gray'" 
		                data-cur="order" @click="NavChange">
		                <view class="cuIcon-similar"></view> 操作条2
		            </view>
		            <!-- 中间发布按钮 -->
		            <view class="action add-action" :class="PageCur=='sub'?'text-green':'text-gray'"         
		                data-cur="sub" @click="NavChange">
		                <button class="cu-btn cuIcon-add bg-green shadow"></button>
		                发布
		            </view>
		            <!-- 购物车、右上角有数字角标 -->
		            <view class="action" :class="PageCur=='cart'?'text-green':'text-gray'" 
		                data-cur="cart" @click="NavChange">
		                <view class="cuIcon-cart">
		                   
		                </view>
		                操作条3
		            </view>
		            <!-- 我的、左上角红色圆点 -->
		            <view class="action" :class="PageCur=='user'?'text-green':'text-gray'" 
		                data-cur="user" @click="NavChange">
		                <view class="cuIcon-my">
		                   
		                </view>
		                操作条4
		            </view>
		        </view>

		
		
		
	</view>
</template>

<script>
	 
	import classifyData from "@/common/classify.data.js";
	
	export default {
		data() {
			return {
			    PageCur: 'home',
			
			}
		},
		computed: {
			
		},
		methods: {
			NavChange: function(e) {
				 console.log("当前页面:"+e.currentTarget.dataset.cur);
		     this.PageCur = e.currentTarget.dataset.cur
		},
		}
	}
</script>

<style lang="scss" >
	
</style>
